package source.model;

import source.events.action.Action;
import source.model.type.*;
import source.view.MainScreen;

public class DerelictOreRefinery extends Item implements Useable{

	public DerelictOreRefinery(){
		super(ItemType.DERELICTOREREFINERY);
	}
	
	public Action use(){
		final Item item=this;
		return new Action(){
			public ActionResult execute(DataHandler dh){
				Player p=dh.playerQuery(dh.getCurrentSelection());
				p.incrementOre(1000);
				MainScreen.writeToConsole("Bonus Ore");
				dh.unassign(item);
				return ActionResult.SUCCESS;
			}
		};
	}
}
